$OpenBSD: patch-unixpk_c,v 1.6 2012/12/11 11:01:31 sthen Exp $
--- unixpk.c.orig	Mon Jul 21 21:50:41 2003
+++ unixpk.c	Tue Dec 11 10:52:18 2012
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include "common.h"
 #include "version.h"
 #include "xmalloc.h"
@@ -164,9 +166,9 @@ int main(int argc, char **argv)
 	    strcpy(fnamebuf, getenv("TMPDIR"));
 	}
 	else {
-	    strcpy(fnamebuf, "/usr/tmp");
+	    strcpy(fnamebuf, "/var/tmp");
 	}
-	strcat(fnamebuf, "/mpackXXXXXX");
+	strcat(fnamebuf, "/mpackXXXXXXXXXX");
 	mktemp(fnamebuf);
 	outfname = strsave(fnamebuf);
     }
